package net.cyue.simple.container.data;

public class InjectableMetaType extends MetaType {
    private final String name;

    public InjectableMetaType(Class<?> clz, String name) {
        super(clz, null);
        this.name = name;
    }
    public InjectableMetaType(MetaType metaType, String name) {
        super(metaType.clz, metaType.dependencies);
        this.name = name;
    }
    @Override
    public String name() {
        return this.name;
    }
    @Override
    public String getName() {
        return this.name;
    }
    @Override
    public int hashCode() {
        if (this.name == null) {
            return super.hashCode();
        } else {
            return ("Injectable@" + this.name).hashCode();
        }
    }
}
